﻿using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.Framework.Reflection;
using Pixysoft.Weblications.Sango.Dao;
using Pixysoft.Weblications.Sango.Protocol.party;
using Pixysoft.Weblications.Sango.Protocol;

namespace Pixysoft.Weblications.Sango.Command.party
{
    partial class SangoPartyHandler
    {
        public party_missionlist party_missionlist()
        {
            string userCode = SangoManager.Authentication();

            party_missionlist response = ReflectionManager.CreatePojo<party_missionlist>();
            response.Succeed = false;

            Entities.Usr_Partymember member = PartyDao.tryGetActiveMember(userCode);

            if (member == null)
            {
                response.Message = "尚未加入军团";
                return response;
            }

            response.missions = (PartyFacade.toMissions(PartyDao.getMissions(member.Partyprimarycode)));
            response.Succeed = true;
            return response;
        }


    }
    public interface party_missionlist : ISangoResponse
    {
        List<party_mission> missions { get;set;}
    }
}
